setClass("NInfGainReductionScore",contains="ReductionScore",
		prototype=prototype(
				.description="Normalised Information Gain Reduction Score class"
		
		)
)  

#methods
#scores set using normalised conditional entropy
setMethod("ScoreSet",
		signature="NInfGainReductionScore",
		definition=function(.Object,inputSet,...){
			callNextMethod(.Object,inputSet,...)
			#discretize using equal frequency method
			inputSet$X <- discretize(inputSet$X)
			#estimate overall mutual information by sum 
			mutInfMatrix <- mutinformation(cbind(inputSet$X,inputSet$Y))
			mutInfMatrixNcol <- ncol(mutInfMatrix)
			diagSum <-sum(diag(mutInfMatrix))
			nig <-sum(mutInfMatrix[mutInfMatrixNcol,-mutInfMatrixNcol])/diagSum
			
			return(nig)
		}
) 
